package diff;

import java.util.List;

/**
 * Representation of a single diff packet
 * 
 * @author Arseny Kapoulkine
 */
public class DiffPacket
{
    /**
     * Source range start.
     */
    public int start;

    /**
     * Source range end.
     */
    public int end;

    /**
     * Contents to replace source range with.
     */
    public List contents;

    /**
     * Ctor for diff packet which removes a range of lines.
     *
     * @param start - range start (in the source file)
     * @param end - range end (in the source file)
     */
    public DiffPacket(int start, int end)
    {
        this.start = start;
        this.end = end;
        this.contents = null;
    }

    /**
     * Ctor for arbitrary diff packet.
     *
     * @param start - range start (in the source file)
     * @param end - range end (in the source file)
     * @param contents - contents to replace range with
     */
    public DiffPacket(int start, int end, List contents)
    {
        this.start = start;
        this.end = end;
        this.contents = contents;
    }
}
